-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Auditbeat] Fixes for system/socket dataset UDP and DNS #14315
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Originally it would only dump 96 bytes, which is insufficient to hold the IP and UDP headers in some cases where a lot of padding is used by the kernel. In those cases the packet would be ignored.
Process data wasn't being properly populated for single-packet flows.
When the incoming sk_buff headers are out of founds for the capture kprobe to dump the full IP and UDP headers, still generate a partial flow that helps enrich the socket with local endpoint and process information. This flow will not be reported as an event because the remote-side is missing.
andrewkroh
approved these changes
Oct 30, 2019
st := makeState(nil, (*logWrapper)(t), time.Second, 0, time.Second) | ||
lPort, rPort := be16(localPort), be16(remotePort) | ||
lAddr, rAddr := ipv4(localIP), ipv4(remoteIP) | ||
evs := []event{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this test format. It's easy to follow what's happening.
adriansr
added a commit
to adriansr/beats
that referenced
this pull request
Oct 30, 2019
This fixes a couple of problems with the dataset: - In some cases incoming UDP packets won't be processed by the dataset due to excessive padding making the headers not fit into the first 96 bytes dumped. Dump 256 bytes to make sure headers are collected. - Single packet flows didn't have proper process and DNS enrichment. (cherry picked from commit c148759)
adriansr
added a commit
that referenced
this pull request
Oct 30, 2019
) This fixes a couple of problems with the dataset: - In some cases incoming UDP packets won't be processed by the dataset due to excessive padding making the headers not fit into the first 96 bytes dumped. Dump 256 bytes to make sure headers are collected. - Single packet flows didn't have proper process and DNS enrichment. (cherry picked from commit c148759)
leweafan
pushed a commit
to leweafan/beats
that referenced
this pull request
Apr 28, 2023
… (elastic#14331) This fixes a couple of problems with the dataset: - In some cases incoming UDP packets won't be processed by the dataset due to excessive padding making the headers not fit into the first 96 bytes dumped. Dump 256 bytes to make sure headers are collected. - Single packet flows didn't have proper process and DNS enrichment. (cherry picked from commit f5db3b2)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes a couple of problems with the dataset: